package Albums 
{
	import flash.events.Event;
	
	/**
	 * ...
	 * @author Serg de Adelantado
	 */
	public class AlbumEvent extends Event 
	{	
		static public const ALBUM_CREATED:String = 'album_created';
		static public const ALBUM_SELECTED:String = 'album_selected';
		static public const ALBUM_UPDATED:String = 'album_updated';
		static public const ALBUM_ERROR:String = 'album_error';
		
		private var FAlbum:AlbumIcon;
		
		public function AlbumEvent(ATtype:String, AAlbum:AlbumIcon = null) 
		{
			super(ATtype);
			FAlbum = AAlbum;
		}
		
		public function get Album():AlbumIcon
		{
			var vAlbum:AlbumIcon;
			FAlbum ? vAlbum = FAlbum : vAlbum = AlbumIcon(target);
			return vAlbum;
		}
	}
}